package com.tank.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import com.tank.service.NoticeService;
import com.tank.util.Pager;

@Controller
@Scope("prototype")
public class NoticeAction extends ActionSupport {

	@Autowired
	@Qualifier("noticeService")
	NoticeService service;
	Pager pager;
	
	public Pager getPager() {
		return pager;
	}

	public void setPager(Pager pager) {
		this.pager = pager;
	}

	public String list() throws Exception {
//		try {
			pager=service.findNoticeList();
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
		return SUCCESS;
	}
}
